Optimal. Leaf size=123 \[ \frac{(a+4 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 b^{3/2} f (a+b)^{5/2}}+\frac{(a+4 b) \tan (e+f x)}{8 b f (a+b)^2 \left (a+b \tan ^2(e+f x)+b\right )}-\frac{a \tan (e+f x)}{4 b f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.101683, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {4146, 385, 199, 205} \[ \frac{(a+4 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 b^{3/2} f (a+b)^{5/2}}+\frac{(a+4 b) \tan (e+f x)}{8 b f (a+b)^2 \left (a+b \tan ^2(e+f x)+b\right )}-\frac{a \tan (e+f x)}{4 b f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4146
Rule 385
Rule 199
Rule 205
Rubi steps
\begin{align*} \int \frac{\sec ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1+x^2}{\left (a+b+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{a \tan (e+f x)}{4 b (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(a+4 b) \operatorname{Subst}\left (\int \frac{1}{\left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 b (a+b) f}\\ &=-\frac{a \tan (e+f x)}{4 b (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(a+4 b) \tan (e+f x)}{8 b (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{(a+4 b) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{8 b (a+b)^2 f}\\ &=\frac{(a+4 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 b^{3/2} (a+b)^{5/2} f}-\frac{a \tan (e+f x)}{4 b (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(a+4 b) \tan (e+f x)}{8 b (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end{align*}
Mathematica [C] time = 3.8305, size = 283, normalized size = 2.3 \[ \frac{\sec ^6(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (\frac{((a+4 b) \sin (2 e)-(a-2 b) \sin (2 f x)) (a \cos (2 (e+f x))+a+2 b)}{b (\cos (e)-\sin (e)) (\sin (e)+\cos (e))}-\frac{4 (a+b) ((a+2 b) \sin (2 e)-a \sin (2 f x))}{a (\cos (e)-\sin (e)) (\sin (e)+\cos (e))}-\frac{(a+4 b) (\cos (2 e)-i \sin (2 e)) (a \cos (2 (e+f x))+a+2 b)^2 \tan ^{-1}\left (\frac{(\cos (2 e)-i \sin (2 e)) \sec (f x) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right )}{b \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right )}{64 f (a+b)^2 \left (a+b \sec ^2(e+f x)\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.071, size = 238, normalized size = 1.9 \begin{align*}{\frac{a \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}b}{2\,f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-{\frac{a\tan \left ( fx+e \right ) }{8\, \left ( a+b \right ) bf \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{\tan \left ( fx+e \right ) }{ \left ( 2\,a+2\,b \right ) f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{a}{8\,f \left ({a}^{2}+2\,ab+{b}^{2} \right ) b}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{1}{2\,f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.667593, size = 1449, normalized size = 11.78 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.39014, size = 231, normalized size = 1.88 \begin{align*} \frac{\frac{{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )}{\left (a + 4 \, b\right )}}{{\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \sqrt{a b + b^{2}}} + \frac{a b \tan \left (f x + e\right )^{3} + 4 \, b^{2} \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right ) + 3 \, a b \tan \left (f x + e\right ) + 4 \, b^{2} \tan \left (f x + e\right )}{{\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )}{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2}}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]